﻿<Window x:Class="RunShellCommands.MainWindow"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:tb="http://www.hardcodet.net/taskbar"
		Title="Run Shell Commands"
		Height="339"
		Width="498"
		Icon="/RunShellCommands;component/Resources/App.ico"
		WindowStartupLocation="CenterScreen"
		WindowState="Normal"
		Visibility="Hidden">
	<Grid>
		<tb:TaskbarIcon x:Name="MyNotifyIcon"
						IconSource="/Resources/Computers.ico"
						ToolTipText="Run Shell Commands"
						MenuActivation="LeftOrRightClick">
			<!-- Set a simple context menu  -->
			<tb:TaskbarIcon.Resources>
				<SolidColorBrush x:Key="WindowBackgroundBrush"
								 Color="#FFF"/>
				<SolidColorBrush x:Key="SolidBorderBrush"
								 Color="#888"/>
			</tb:TaskbarIcon.Resources>
			<tb:TaskbarIcon.ContextMenu>
				<ContextMenu>
					<ContextMenu.Style>
						<Style TargetType="{x:Type ContextMenu}">
							<Setter Property="SnapsToDevicePixels"
									Value="True"/>
							<Setter Property="OverridesDefaultStyle"
									Value="True"/>
							<Setter Property="Grid.IsSharedSizeScope"
									Value="true"/>
							<Setter Property="HasDropShadow"
									Value="True"/>
							<Setter Property="Template">
								<Setter.Value>
									<ControlTemplate TargetType="{x:Type ContextMenu}">
										<Border Name="Border"
												Background="{StaticResource WindowBackgroundBrush}"
												BorderBrush="{StaticResource SolidBorderBrush}"
												BorderThickness="1">
											<WrapPanel IsItemsHost="True"
													   Orientation="Vertical"
													   KeyboardNavigation.DirectionalNavigation="Cycle"/>
										</Border>
										<ControlTemplate.Triggers>
											<Trigger Property="HasDropShadow"
													 Value="true">
												<Setter TargetName="Border"
														Property="Padding"
														Value="0,3,0,3"/>
												<Setter TargetName="Border"
														Property="CornerRadius"
														Value="4"/>
											</Trigger>
										</ControlTemplate.Triggers>
									</ControlTemplate>
								</Setter.Value>
							</Setter>
						</Style>
					</ContextMenu.Style>
					<Separator/>
					<MenuItem Header="_Open"
							  Click="OnMenuItemOpenClick"/>
					<Separator/>
					<MenuItem Header="_Exit"
							  Click="OnMenuItemExitClick"/>
				</ContextMenu>
			</tb:TaskbarIcon.ContextMenu>
		</tb:TaskbarIcon>
		<DockPanel Width="Auto"
				   Height="Auto"
				   LastChildFill="True">
			<ListBox DockPanel.Dock="Top"
					 HorizontalAlignment="Stretch"
					 Margin="12,12,12,12"
					 Name="lbCommands"
					 VerticalAlignment="Stretch"
					 SelectionChanged="LbCommandsSelectionChanged"
					 ClipToBounds="False"
					 HorizontalContentAlignment="Left"/>
		</DockPanel>
	</Grid>
</Window>